﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="signin.aspx.cs" Inherits="signin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>登陆页</title>
    <script src="Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="Scripts/gz_Validator-4.1.1.js" type="text/javascript" charset="UTF-8"></script>
    <script src="Scripts/gz_ValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
    <script type="text/javascript">
        $(function () {
            $.formValidator.initConfig({ theme: "126", formID: "form1",
                ajaxForm: {
                    dataType: "text",
                    buttons: $("#button"),
                    url: "ajax/ajaxcustomer.ashx?methodName=CustomerLogin",
                    success: function (data) {
                        if (data.indexOf("登录成功!") > 0) {
                            alert("登录成功!");
                            $("#txt_Email").val(""); $("#txt_PWD").val("");
                        } else {
                            alert("账户或密码不正确,请重新输入!");
                        }
                    }
                },
                onError: function (msg) { alert(msg); },
                submitAfterAjaxPrompt: '有数据正在异步验证，请稍等...'
            });
            $("#txt_Email").formValidator({ onShowFixText: "6~18个字符，包括字母、数字、下划线，以字母开头，字母或数字结尾", onShow: "请输入邮箱", onFocus: "邮箱6-100个字符,输入正确了才能离开焦点", onCorrect: "", defaultValue: "@" }).inputValidator({ min: 6, max: 100, onError: "你输入的邮箱长度非法,请确认" }).regexValidator({ regExp: "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", onError: "你输入的邮箱格式不正确" })
            $("#txt_PWD").formValidator({ onShowFixText: "6~16个字符，包括字母、数字、特殊符号，区分大小写", onShow: "请输入密码", onFocus: "至少1个长度", onCorrect: "" }).inputValidator({ min: 6, max: 16, empty: { leftEmpty: false, rightEmpty: false, emptyError: "密码两边不能有空符号" }, onError: "密码长度错误,请确认" }).passwordValidator({ compareID: "txt_Email" });
        })

 
    </script>
</head>
<body>
    <form id="form1">
    欢迎登录果之&nbsp;&nbsp; <a href="register.aspx">立即注册</a><br />
    emial:
    <input id="txt_Email" type="text" name="txt_Email" /><div id="txt_EmailTip" style="width: 280px">
    </div>
    <br />
    pwd:<input id="txt_PWD" type="password" name="txt_PWD" /><div id="txt_PWDTip" style="width: 280px">
    </div>
    <br />
    <input id="btn_Login" type="submit" value="登录" />
    <%--    <input name="methodName" type="hidden" value="CustomerLogin" />--%>
    </form>
</body>
</html>
